package com.shine.app.bean;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.content.res.Resources;

import com.shine.app.R;

public class Maps extends BaseBean {

	private static final long serialVersionUID = 1L;
	private String key;
	private String value;
	private int id;

	public Maps() {
	}

	public Maps(String key, String value, int id) {
		this.key = key;
		this.value = value;
		this.id = id;
	}

	public Maps(String key, int id) {
		this.key = key;
		this.id = id;
	}

	public Maps(String key, String value) {
		this.key = key;
		this.value = value;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public static List<Maps> parse(Context context) {

		List<Maps> list = new ArrayList<Maps>();
		list.add(new Maps(getValues(context, R.string.sort_teetime), getValues(
				context, R.string.unit_ampm), 0));
		list.add(new Maps(getValues(context, R.string.sort_teetime), getValues(
				context, R.string.unit_pmam), 1));
		list.add(new Maps(getValues(context, R.string.sort_name), getValues(
				context, R.string.unit_az), 2));
		list.add(new Maps(getValues(context, R.string.sort_price), getValues(
				context, R.string.unit_lowest), 3));
		list.add(new Maps(getValues(context, R.string.sort_price), getValues(
				context, R.string.unit_highest), 4));
		list.add(new Maps(getValues(context, R.string.sort_distance), "", 5));
		list.add(new Maps(getValues(context, R.string.sort_rating), getValues(
				context, R.string.unit_highest), 6));
		list.add(new Maps(getValues(context, R.string.sort_popular), getValues(
				context, R.string.unit_popular), 7));
		return list;
	}

	private static String getValues(Context context, int id) {
		Resources resources = context.getResources();
		String name = resources.getString(id);
		return name;
	}
}
